// DirectiveParser.h : Declaration of the CDirectiveParser

#pragma once
#include "resource.h"       // main symbols

[
	object,
	uuid("0678D20A-087D-4D9E-ABC1-DE5FBC515F8F"),
	dual,	helpstring("IDirectiveCallback Interface"),
	pointer_default(unique)
]
__interface IDirectiveCallback : IDispatch
{
	[id(1), helpstring("method SetName")] HRESULT SetName([in] BSTR Name);
	[id(2), helpstring("method AddAttribute")] HRESULT AddAttribute([in] BSTR AttributeName, [in] BSTR Value);
};

// IDirectiveParser
[
	object,
	uuid("D5F3443D-4BAF-4A99-AF93-61B7F07CA6AF"),
	dual,	helpstring("IDirectiveParser Interface"),
	pointer_default(unique)
]
__interface IDirectiveParser : IDispatch
{
	[id(1), helpstring("method Parse")] HRESULT Parse([in] BSTR bstrText, [in] IDirectiveCallback* callback);
};



// CDirectiveParser

[
	coclass,
	threading("free"),
	support_error_info("IDirectiveParser"),
	vi_progid("CodeSmithParser.DirectiveParser"),
	progid("CodeSmithParser.DirectiveParser.1"),
	version(1.0),
	uuid("66E00448-EA6F-464D-9E19-12488723C421"),
	helpstring("DirectiveParser Class")
]
class ATL_NO_VTABLE CDirectiveParser : 
	public IDirectiveParser
{
public:
	CDirectiveParser()
	{
	}


	DECLARE_PROTECT_FINAL_CONSTRUCT()

	HRESULT FinalConstruct()
	{
		return S_OK;
	}
	
	void FinalRelease() 
	{
	}

public:

	STDMETHOD(Parse)(BSTR bstrText, IDirectiveCallback* callback);
};

